﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserInfo.aspx.cs" Inherits="SysManage_UserInfo" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>用户管理</title>
    <link rel="stylesheet" href="../Content/redmond/jquery-ui-1.9.2.custom.min.css" type="text/css" />
    <link rel="stylesheet" href="../Content/SysManage.css" type="text/css" />

    <script src="../Scripts/jquery-1.8.3.js" type="text/javascript"></script>

    <script src="../Scripts/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>

    <script src="../Scripts/UserInfo.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="ContentDiv">
            <p>
                <label for="Login_Name_I" class="lTitle">
                    登录名:</label>
                <asp:TextBox ID="Login_Name_I" runat="server" MaxLength="16" CssClass="text ui-widget-content"></asp:TextBox>
                <asp:Button ID="Query_User" runat="server" Text="查询" OnClick="QueryUser_Click" CssClass="BtnLeft" />
                <input id="AddUser" type="button" value="新增用户" class="BtnLeft" />
            </p>
            <asp:GridView ID="UserList" runat="server" AutoGenerateColumns="False" EmptyDataText="对不起,未找到相关数据！"
                Width="100%" CssClass="ui-widget ui-widget-content" OnRowCommand="UserList_RowCommand">
                <HeaderStyle CssClass="ui-widget-header" />
                <Columns>
                    <asp:BoundField DataField="login_name" HeaderText="登录名" SortExpression="login_name"
                        ReadOnly="True"></asp:BoundField>
                    <asp:BoundField DataField="real_name" HeaderText="姓名" SortExpression="real_name" />
                    <asp:BoundField DataField="organ" HeaderText="组织机构" SortExpression="organ" />
                    <asp:BoundField DataField="if_valid" HeaderText="是否有效" SortExpression="if_valid">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="join_date" HeaderText="何时新增" SortExpression="join_date" />
                    <asp:TemplateField>
                        <ItemStyle HorizontalAlign="Right" />
                        <ItemTemplate>
                            <asp:Button ID="ModifyUser_G" runat="server" Font-Size="13px" CausesValidation="false"
                                Text="更新配置" CommandName="ModifyUser" 
                                CommandArgument='<%# Bind("login_name")%>' CssClass="ui-button ui-state-default ui-corner-all"/>
                            <asp:Button ID="ResetPassword" runat="server" Font-Size="13px" CausesValidation="false"
                                Text="密码重置" CommandName="Reset" CommandArgument='<%# Bind("login_name")%>' 
                                OnClientClick="return confirm('确认需要重置密码吗？');" CssClass="ui-button ui-state-default ui-corner-all"/>
                            <asp:Button ID="ChargeStatus" runat="server" Font-Size="13px" CausesValidation="false"
                                Text="状态切换" CommandName="Charge" CommandArgument='<%# Bind("login_name")%>' 
                                CssClass="ui-button ui-state-default ui-corner-all"/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div style="text-align: right; padding: 5px;">
                <webdiyer:AspNetPager ID="UserPager" runat="server" OnPageChanged="UserPager_PageChanged">
                </webdiyer:AspNetPager>
            </div>
        </div>
        <div id="AddUserDiv" title="新增用户" class="DialogDiv">
            <fieldset>
                <p>
                    <label for="User_Login_A">
                        登录名:</label>
                    <asp:TextBox ID="User_Login_A" runat="server" CssClass="text ui-widget-content ui-corner-all"
                        MaxLength="20"></asp:TextBox></p>
                <p>
                    <label for="Real_Name_A">
                        姓名:</label>
                    <asp:TextBox ID="Real_Name_A" runat="server" CssClass="text ui-widget-content ui-corner-all"
                        MaxLength="20"></asp:TextBox></p>
                <p>
                    <label for="Organ_A">
                        组织机构:</label>
                    <asp:DropDownList runat="server" ID="Organ_A" CssClass="text ui-widget-content ui-corner-all">
                    </asp:DropDownList></p>
                <p>
                    <label for="Login_Psd_A">
                        初始密码:</label>
                    <asp:TextBox runat="server" ID="Login_Psd_A" CssClass="text ui-widget-content ui-corner-all"
                        Enabled="false"></asp:TextBox>
                </p>
            </fieldset>
            <p class="ActionP">
                <asp:Button ID="BtnCreate" runat="server" Text="创建" OnClick="BtnCreate_Click" />
                <input id="BtnCancel" type="button" value="取消" /></p>
        </div>
        <div id="ModifyUserDiv" title="用户信息配置" class="DialogDiv">
            <fieldset class="ui-widget ui-widget-content">
                <p>
                    <label for="Login_Name_R">
                        登录名:</label>
                    <asp:TextBox ID="Login_Name_R" runat="server" CssClass="text ui-widget-content ui-corner-all"
                        ReadOnly="true"></asp:TextBox></p>
                <p>
                    <label for="Real_Name_R">
                        姓名:</label>
                    <asp:TextBox ID="Real_Name_R" runat="server" CssClass="text ui-widget-content ui-corner-all"
                     MaxLength="20">
                    </asp:TextBox></p>
                <p>
                    <label for="Organ_R">
                        组织机构:</label>
                    <asp:DropDownList runat="server" ID="Organ_R" CssClass="text ui-widget-content ui-corner-all">
                    </asp:DropDownList></p>
                <p>
                    <label for="RoleList">
                        设置角色:</label> 
                <asp:CheckBoxList ID="RoleList" runat="server" RepeatLayout="Flow" RepeatColumns="2" CssClass="CKList">
                </asp:CheckBoxList></p>
            </fieldset>
            <p class="ActionP">
                <asp:Button ID="ModifyBtn" runat="server" Text="更新" OnClick="ModifyBtn_Click" />
                <input id="BtnCancelR" type="button" value="取消" />
            </p>
        </div>
    </form>
</body>
</html>
